Left Termination of the query pattern ss_in_2(a, g) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

ss(Xs, Ys) :- ','(perm(Xs, Ys), ordered(Ys)).
perm([], []).
perm(Xs, .(X, Ys)) :- ','(app(X1s, .(X, X2s), Xs), ','(app(X1s, X2s, Zs), perm(Zs, Ys))).
app([], X, X).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).
ordered([]).
ordered(.(X, [])).
ordered(.(X, .(Y, Xs))) :- ','(less(X, s(Y)), ordered(.(Y, Xs))).
less(0, s(X)).
less(s(X), s(Y)) :- less(X, Y).

Queries:

ss(a,g).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x3, x4)
U5(x1, x2, x3, x4)  =  U5(x4)
perm_out(x1, x2)  =  perm_out
U2(x1, x2, x3)  =  U2(x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
U8(x1, x2, x3, x4)  =  U8(x4)
ordered_out(x1)  =  ordered_out
ss_out(x1, x2)  =  ss_out

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x3, x4)
U5(x1, x2, x3, x4)  =  U5(x4)
perm_out(x1, x2)  =  perm_out
U2(x1, x2, x3)  =  U2(x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
U8(x1, x2, x3, x4)  =  U8(x4)
ordered_out(x1)  =  ordered_out
ss_out(x1, x2)  =  ss_out


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

SS_IN(Xs, Ys) → U11(Xs, Ys, perm_in(Xs, Ys))
SS_IN(Xs, Ys) → PERM_IN(Xs, Ys)
PERM_IN(Xs, .(X, Ys)) → U31(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
PERM_IN(Xs, .(X, Ys)) → APP_IN(X1s, .(X, X2s), Xs)
APP_IN(.(X, Xs), Ys, .(X, Zs)) → U61(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
APP_IN(.(X, Xs), Ys, .(X, Zs)) → APP_IN(Xs, Ys, Zs)
U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U41(Xs, X, Ys, app_in(X1s, X2s, Zs))
U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → APP_IN(X1s, X2s, Zs)
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U51(Xs, X, Ys, perm_in(Zs, Ys))
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → PERM_IN(Zs, Ys)
U11(Xs, Ys, perm_out(Xs, Ys)) → U21(Xs, Ys, ordered_in(Ys))
U11(Xs, Ys, perm_out(Xs, Ys)) → ORDERED_IN(Ys)
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))
ORDERED_IN(.(X, .(Y, Xs))) → LESS_IN(X, s(Y))
LESS_IN(s(X), s(Y)) → U91(X, Y, less_in(X, Y))
LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)
U71(X, Y, Xs, less_out(X, s(Y))) → U81(X, Y, Xs, ordered_in(.(Y, Xs)))
U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x3, x4)
U5(x1, x2, x3, x4)  =  U5(x4)
perm_out(x1, x2)  =  perm_out
U2(x1, x2, x3)  =  U2(x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
U8(x1, x2, x3, x4)  =  U8(x4)
ordered_out(x1)  =  ordered_out
ss_out(x1, x2)  =  ss_out
U41(x1, x2, x3, x4)  =  U41(x3, x4)
ORDERED_IN(x1)  =  ORDERED_IN(x1)
PERM_IN(x1, x2)  =  PERM_IN(x2)
U91(x1, x2, x3)  =  U91(x3)
U61(x1, x2, x3, x4, x5)  =  U61(x5)
U71(x1, x2, x3, x4)  =  U71(x2, x3, x4)
U11(x1, x2, x3)  =  U11(x2, x3)
APP_IN(x1, x2, x3)  =  APP_IN
SS_IN(x1, x2)  =  SS_IN(x2)
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)
U51(x1, x2, x3, x4)  =  U51(x4)
U31(x1, x2, x3, x4)  =  U31(x3, x4)
U81(x1, x2, x3, x4)  =  U81(x4)
U21(x1, x2, x3)  =  U21(x3)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SS_IN(Xs, Ys) → U11(Xs, Ys, perm_in(Xs, Ys))
SS_IN(Xs, Ys) → PERM_IN(Xs, Ys)
PERM_IN(Xs, .(X, Ys)) → U31(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
PERM_IN(Xs, .(X, Ys)) → APP_IN(X1s, .(X, X2s), Xs)
APP_IN(.(X, Xs), Ys, .(X, Zs)) → U61(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
APP_IN(.(X, Xs), Ys, .(X, Zs)) → APP_IN(Xs, Ys, Zs)
U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U41(Xs, X, Ys, app_in(X1s, X2s, Zs))
U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → APP_IN(X1s, X2s, Zs)
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U51(Xs, X, Ys, perm_in(Zs, Ys))
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → PERM_IN(Zs, Ys)
U11(Xs, Ys, perm_out(Xs, Ys)) → U21(Xs, Ys, ordered_in(Ys))
U11(Xs, Ys, perm_out(Xs, Ys)) → ORDERED_IN(Ys)
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))
ORDERED_IN(.(X, .(Y, Xs))) → LESS_IN(X, s(Y))
LESS_IN(s(X), s(Y)) → U91(X, Y, less_in(X, Y))
LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)
U71(X, Y, Xs, less_out(X, s(Y))) → U81(X, Y, Xs, ordered_in(.(Y, Xs)))
U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x3, x4)
U5(x1, x2, x3, x4)  =  U5(x4)
perm_out(x1, x2)  =  perm_out
U2(x1, x2, x3)  =  U2(x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
U8(x1, x2, x3, x4)  =  U8(x4)
ordered_out(x1)  =  ordered_out
ss_out(x1, x2)  =  ss_out
U41(x1, x2, x3, x4)  =  U41(x3, x4)
ORDERED_IN(x1)  =  ORDERED_IN(x1)
PERM_IN(x1, x2)  =  PERM_IN(x2)
U91(x1, x2, x3)  =  U91(x3)
U61(x1, x2, x3, x4, x5)  =  U61(x5)
U71(x1, x2, x3, x4)  =  U71(x2, x3, x4)
U11(x1, x2, x3)  =  U11(x2, x3)
APP_IN(x1, x2, x3)  =  APP_IN
SS_IN(x1, x2)  =  SS_IN(x2)
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)
U51(x1, x2, x3, x4)  =  U51(x4)
U31(x1, x2, x3, x4)  =  U31(x3, x4)
U81(x1, x2, x3, x4)  =  U81(x4)
U21(x1, x2, x3)  =  U21(x3)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 4 SCCs with 11 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x3, x4)
U5(x1, x2, x3, x4)  =  U5(x4)
perm_out(x1, x2)  =  perm_out
U2(x1, x2, x3)  =  U2(x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
U8(x1, x2, x3, x4)  =  U8(x4)
ordered_out(x1)  =  ordered_out
ss_out(x1, x2)  =  ss_out
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x3, x4)
U5(x1, x2, x3, x4)  =  U5(x4)
perm_out(x1, x2)  =  perm_out
U2(x1, x2, x3)  =  U2(x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
U8(x1, x2, x3, x4)  =  U8(x4)
ordered_out(x1)  =  ordered_out
ss_out(x1, x2)  =  ss_out
ORDERED_IN(x1)  =  ORDERED_IN(x1)
U71(x1, x2, x3, x4)  =  U71(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))

The TRS R consists of the following rules:

less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
ORDERED_IN(x1)  =  ORDERED_IN(x1)
U71(x1, x2, x3, x4)  =  U71(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U71(Y, Xs, less_out) → ORDERED_IN(.(Y, Xs))
ORDERED_IN(.(X, .(Y, Xs))) → U71(Y, Xs, less_in(X, s(Y)))

The TRS R consists of the following rules:

less_in(s(X), s(Y)) → U9(less_in(X, Y))
less_in(0, s(X)) → less_out
U9(less_out) → less_out

The set Q consists of the following terms:

less_in(x0, x1)
U9(x0)

We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

U71(Y, Xs, less_out) → ORDERED_IN(.(Y, Xs))
The following rules are removed from R:

less_in(0, s(X)) → less_out
Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = x1 + 2·x2   
POL(0) = 2   
POL(ORDERED_IN(x1)) = x1   
POL(U71(x1, x2, x3)) = x1 + 2·x2 + x3   
POL(U9(x1)) = x1   
POL(less_in(x1, x2)) = x1 + x2   
POL(less_out) = 2   
POL(s(x1)) = x1   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ DependencyGraphProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

ORDERED_IN(.(X, .(Y, Xs))) → U71(Y, Xs, less_in(X, s(Y)))

The TRS R consists of the following rules:

less_in(s(X), s(Y)) → U9(less_in(X, Y))
U9(less_out) → less_out

The set Q consists of the following terms:

less_in(x0, x1)
U9(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APP_IN(.(X, Xs), Ys, .(X, Zs)) → APP_IN(Xs, Ys, Zs)

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x3, x4)
U5(x1, x2, x3, x4)  =  U5(x4)
perm_out(x1, x2)  =  perm_out
U2(x1, x2, x3)  =  U2(x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
U8(x1, x2, x3, x4)  =  U8(x4)
ordered_out(x1)  =  ordered_out
ss_out(x1, x2)  =  ss_out
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APP_IN(.(X, Xs), Ys, .(X, Zs)) → APP_IN(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

APP_INAPP_IN

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP_INAPP_IN

The TRS R consists of the following rules:none


s = APP_IN evaluates to t =APP_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP_IN to APP_IN.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U41(Xs, X, Ys, app_in(X1s, X2s, Zs))
PERM_IN(Xs, .(X, Ys)) → U31(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → PERM_IN(Zs, Ys)

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x3, x4)
U5(x1, x2, x3, x4)  =  U5(x4)
perm_out(x1, x2)  =  perm_out
U2(x1, x2, x3)  =  U2(x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x3)
0  =  0
less_out(x1, x2)  =  less_out
U8(x1, x2, x3, x4)  =  U8(x4)
ordered_out(x1)  =  ordered_out
ss_out(x1, x2)  =  ss_out
U41(x1, x2, x3, x4)  =  U41(x3, x4)
PERM_IN(x1, x2)  =  PERM_IN(x2)
U31(x1, x2, x3, x4)  =  U31(x3, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U41(Xs, X, Ys, app_in(X1s, X2s, Zs))
PERM_IN(Xs, .(X, Ys)) → U31(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → PERM_IN(Zs, Ys)

The TRS R consists of the following rules:

app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U41(x1, x2, x3, x4)  =  U41(x3, x4)
PERM_IN(x1, x2)  =  PERM_IN(x2)
U31(x1, x2, x3, x4)  =  U31(x3, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U31(Ys, app_out) → U41(Ys, app_in)
U41(Ys, app_out) → PERM_IN(Ys)
PERM_IN(.(X, Ys)) → U31(Ys, app_in)

The TRS R consists of the following rules:

app_inU6(app_in)
app_inapp_out
U6(app_out) → app_out

The set Q consists of the following terms:

app_in
U6(x0)

We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:


We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x2, x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x2, x3, x4)
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
perm_out(x1, x2)  =  perm_out(x2)
U2(x1, x2, x3)  =  U2(x2, x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x1, x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x1, x2, x3)
0  =  0
less_out(x1, x2)  =  less_out(x1, x2)
U8(x1, x2, x3, x4)  =  U8(x1, x2, x3, x4)
ordered_out(x1)  =  ordered_out(x1)
ss_out(x1, x2)  =  ss_out(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x2, x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x2, x3, x4)
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
perm_out(x1, x2)  =  perm_out(x2)
U2(x1, x2, x3)  =  U2(x2, x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x1, x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x1, x2, x3)
0  =  0
less_out(x1, x2)  =  less_out(x1, x2)
U8(x1, x2, x3, x4)  =  U8(x1, x2, x3, x4)
ordered_out(x1)  =  ordered_out(x1)
ss_out(x1, x2)  =  ss_out(x2)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

SS_IN(Xs, Ys) → U11(Xs, Ys, perm_in(Xs, Ys))
SS_IN(Xs, Ys) → PERM_IN(Xs, Ys)
PERM_IN(Xs, .(X, Ys)) → U31(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
PERM_IN(Xs, .(X, Ys)) → APP_IN(X1s, .(X, X2s), Xs)
APP_IN(.(X, Xs), Ys, .(X, Zs)) → U61(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
APP_IN(.(X, Xs), Ys, .(X, Zs)) → APP_IN(Xs, Ys, Zs)
U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U41(Xs, X, Ys, app_in(X1s, X2s, Zs))
U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → APP_IN(X1s, X2s, Zs)
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U51(Xs, X, Ys, perm_in(Zs, Ys))
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → PERM_IN(Zs, Ys)
U11(Xs, Ys, perm_out(Xs, Ys)) → U21(Xs, Ys, ordered_in(Ys))
U11(Xs, Ys, perm_out(Xs, Ys)) → ORDERED_IN(Ys)
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))
ORDERED_IN(.(X, .(Y, Xs))) → LESS_IN(X, s(Y))
LESS_IN(s(X), s(Y)) → U91(X, Y, less_in(X, Y))
LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)
U71(X, Y, Xs, less_out(X, s(Y))) → U81(X, Y, Xs, ordered_in(.(Y, Xs)))
U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x2, x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x2, x3, x4)
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
perm_out(x1, x2)  =  perm_out(x2)
U2(x1, x2, x3)  =  U2(x2, x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x1, x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x1, x2, x3)
0  =  0
less_out(x1, x2)  =  less_out(x1, x2)
U8(x1, x2, x3, x4)  =  U8(x1, x2, x3, x4)
ordered_out(x1)  =  ordered_out(x1)
ss_out(x1, x2)  =  ss_out(x2)
U41(x1, x2, x3, x4)  =  U41(x2, x3, x4)
ORDERED_IN(x1)  =  ORDERED_IN(x1)
PERM_IN(x1, x2)  =  PERM_IN(x2)
U91(x1, x2, x3)  =  U91(x1, x2, x3)
U61(x1, x2, x3, x4, x5)  =  U61(x5)
U71(x1, x2, x3, x4)  =  U71(x1, x2, x3, x4)
U11(x1, x2, x3)  =  U11(x2, x3)
APP_IN(x1, x2, x3)  =  APP_IN
SS_IN(x1, x2)  =  SS_IN(x2)
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)
U51(x1, x2, x3, x4)  =  U51(x2, x3, x4)
U31(x1, x2, x3, x4)  =  U31(x2, x3, x4)
U81(x1, x2, x3, x4)  =  U81(x1, x2, x3, x4)
U21(x1, x2, x3)  =  U21(x2, x3)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

SS_IN(Xs, Ys) → U11(Xs, Ys, perm_in(Xs, Ys))
SS_IN(Xs, Ys) → PERM_IN(Xs, Ys)
PERM_IN(Xs, .(X, Ys)) → U31(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
PERM_IN(Xs, .(X, Ys)) → APP_IN(X1s, .(X, X2s), Xs)
APP_IN(.(X, Xs), Ys, .(X, Zs)) → U61(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
APP_IN(.(X, Xs), Ys, .(X, Zs)) → APP_IN(Xs, Ys, Zs)
U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U41(Xs, X, Ys, app_in(X1s, X2s, Zs))
U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → APP_IN(X1s, X2s, Zs)
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U51(Xs, X, Ys, perm_in(Zs, Ys))
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → PERM_IN(Zs, Ys)
U11(Xs, Ys, perm_out(Xs, Ys)) → U21(Xs, Ys, ordered_in(Ys))
U11(Xs, Ys, perm_out(Xs, Ys)) → ORDERED_IN(Ys)
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))
ORDERED_IN(.(X, .(Y, Xs))) → LESS_IN(X, s(Y))
LESS_IN(s(X), s(Y)) → U91(X, Y, less_in(X, Y))
LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)
U71(X, Y, Xs, less_out(X, s(Y))) → U81(X, Y, Xs, ordered_in(.(Y, Xs)))
U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x2, x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x2, x3, x4)
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
perm_out(x1, x2)  =  perm_out(x2)
U2(x1, x2, x3)  =  U2(x2, x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x1, x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x1, x2, x3)
0  =  0
less_out(x1, x2)  =  less_out(x1, x2)
U8(x1, x2, x3, x4)  =  U8(x1, x2, x3, x4)
ordered_out(x1)  =  ordered_out(x1)
ss_out(x1, x2)  =  ss_out(x2)
U41(x1, x2, x3, x4)  =  U41(x2, x3, x4)
ORDERED_IN(x1)  =  ORDERED_IN(x1)
PERM_IN(x1, x2)  =  PERM_IN(x2)
U91(x1, x2, x3)  =  U91(x1, x2, x3)
U61(x1, x2, x3, x4, x5)  =  U61(x5)
U71(x1, x2, x3, x4)  =  U71(x1, x2, x3, x4)
U11(x1, x2, x3)  =  U11(x2, x3)
APP_IN(x1, x2, x3)  =  APP_IN
SS_IN(x1, x2)  =  SS_IN(x2)
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)
U51(x1, x2, x3, x4)  =  U51(x2, x3, x4)
U31(x1, x2, x3, x4)  =  U31(x2, x3, x4)
U81(x1, x2, x3, x4)  =  U81(x1, x2, x3, x4)
U21(x1, x2, x3)  =  U21(x2, x3)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 4 SCCs with 11 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x2, x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x2, x3, x4)
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
perm_out(x1, x2)  =  perm_out(x2)
U2(x1, x2, x3)  =  U2(x2, x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x1, x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x1, x2, x3)
0  =  0
less_out(x1, x2)  =  less_out(x1, x2)
U8(x1, x2, x3, x4)  =  U8(x1, x2, x3, x4)
ordered_out(x1)  =  ordered_out(x1)
ss_out(x1, x2)  =  ss_out(x2)
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x2, x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x2, x3, x4)
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
perm_out(x1, x2)  =  perm_out(x2)
U2(x1, x2, x3)  =  U2(x2, x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x1, x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x1, x2, x3)
0  =  0
less_out(x1, x2)  =  less_out(x1, x2)
U8(x1, x2, x3, x4)  =  U8(x1, x2, x3, x4)
ordered_out(x1)  =  ordered_out(x1)
ss_out(x1, x2)  =  ss_out(x2)
ORDERED_IN(x1)  =  ORDERED_IN(x1)
U71(x1, x2, x3, x4)  =  U71(x1, x2, x3, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))

The TRS R consists of the following rules:

less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))

Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ RuleRemovalProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))
ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))

The TRS R consists of the following rules:

less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))

The set Q consists of the following terms:

less_in(x0, x1)
U9(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

ORDERED_IN(.(X, .(Y, Xs))) → U71(X, Y, Xs, less_in(X, s(Y)))


Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = 2·x1 + x2   
POL(0) = 2   
POL(ORDERED_IN(x1)) = 2 + 2·x1   
POL(U71(x1, x2, x3, x4)) = x1 + 2·x2 + 2·x3 + x4   
POL(U9(x1, x2, x3)) = 2·x1 + x2 + x3   
POL(less_in(x1, x2)) = 2·x1 + x2   
POL(less_out(x1, x2)) = 2 + x1 + x2   
POL(s(x1)) = 2·x1   



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ DependencyGraphProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

U71(X, Y, Xs, less_out(X, s(Y))) → ORDERED_IN(.(Y, Xs))

The TRS R consists of the following rules:

less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))

The set Q consists of the following terms:

less_in(x0, x1)
U9(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN(.(X, Xs), Ys, .(X, Zs)) → APP_IN(Xs, Ys, Zs)

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x2, x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x2, x3, x4)
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
perm_out(x1, x2)  =  perm_out(x2)
U2(x1, x2, x3)  =  U2(x2, x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x1, x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x1, x2, x3)
0  =  0
less_out(x1, x2)  =  less_out(x1, x2)
U8(x1, x2, x3, x4)  =  U8(x1, x2, x3, x4)
ordered_out(x1)  =  ordered_out(x1)
ss_out(x1, x2)  =  ss_out(x2)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN(.(X, Xs), Ys, .(X, Zs)) → APP_IN(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APP_INAPP_IN

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP_INAPP_IN

The TRS R consists of the following rules:none


s = APP_IN evaluates to t =APP_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP_IN to APP_IN.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U41(Xs, X, Ys, app_in(X1s, X2s, Zs))
PERM_IN(Xs, .(X, Ys)) → U31(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → PERM_IN(Zs, Ys)

The TRS R consists of the following rules:

ss_in(Xs, Ys) → U1(Xs, Ys, perm_in(Xs, Ys))
perm_in(Xs, .(X, Ys)) → U3(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))
U3(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U4(Xs, X, Ys, app_in(X1s, X2s, Zs))
U4(Xs, X, Ys, app_out(X1s, X2s, Zs)) → U5(Xs, X, Ys, perm_in(Zs, Ys))
perm_in([], []) → perm_out([], [])
U5(Xs, X, Ys, perm_out(Zs, Ys)) → perm_out(Xs, .(X, Ys))
U1(Xs, Ys, perm_out(Xs, Ys)) → U2(Xs, Ys, ordered_in(Ys))
ordered_in(.(X, .(Y, Xs))) → U7(X, Y, Xs, less_in(X, s(Y)))
less_in(s(X), s(Y)) → U9(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U9(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U7(X, Y, Xs, less_out(X, s(Y))) → U8(X, Y, Xs, ordered_in(.(Y, Xs)))
ordered_in(.(X, [])) → ordered_out(.(X, []))
ordered_in([]) → ordered_out([])
U8(X, Y, Xs, ordered_out(.(Y, Xs))) → ordered_out(.(X, .(Y, Xs)))
U2(Xs, Ys, ordered_out(Ys)) → ss_out(Xs, Ys)

The argument filtering Pi contains the following mapping:
ss_in(x1, x2)  =  ss_in(x2)
U1(x1, x2, x3)  =  U1(x2, x3)
perm_in(x1, x2)  =  perm_in(x2)
.(x1, x2)  =  .(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x2, x3, x4)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U4(x1, x2, x3, x4)  =  U4(x2, x3, x4)
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
perm_out(x1, x2)  =  perm_out(x2)
U2(x1, x2, x3)  =  U2(x2, x3)
ordered_in(x1)  =  ordered_in(x1)
U7(x1, x2, x3, x4)  =  U7(x1, x2, x3, x4)
less_in(x1, x2)  =  less_in(x1, x2)
s(x1)  =  s(x1)
U9(x1, x2, x3)  =  U9(x1, x2, x3)
0  =  0
less_out(x1, x2)  =  less_out(x1, x2)
U8(x1, x2, x3, x4)  =  U8(x1, x2, x3, x4)
ordered_out(x1)  =  ordered_out(x1)
ss_out(x1, x2)  =  ss_out(x2)
U41(x1, x2, x3, x4)  =  U41(x2, x3, x4)
PERM_IN(x1, x2)  =  PERM_IN(x2)
U31(x1, x2, x3, x4)  =  U31(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U31(Xs, X, Ys, app_out(X1s, .(X, X2s), Xs)) → U41(Xs, X, Ys, app_in(X1s, X2s, Zs))
PERM_IN(Xs, .(X, Ys)) → U31(Xs, X, Ys, app_in(X1s, .(X, X2s), Xs))
U41(Xs, X, Ys, app_out(X1s, X2s, Zs)) → PERM_IN(Zs, Ys)

The TRS R consists of the following rules:

app_in(.(X, Xs), Ys, .(X, Zs)) → U6(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in([], X, X) → app_out([], X, X)
U6(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(.(X, Xs), Ys, .(X, Zs))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
app_in(x1, x2, x3)  =  app_in
U6(x1, x2, x3, x4, x5)  =  U6(x5)
[]  =  []
app_out(x1, x2, x3)  =  app_out
U41(x1, x2, x3, x4)  =  U41(x2, x3, x4)
PERM_IN(x1, x2)  =  PERM_IN(x2)
U31(x1, x2, x3, x4)  =  U31(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN(.(X, Ys)) → U31(X, Ys, app_in)
U31(X, Ys, app_out) → U41(X, Ys, app_in)
U41(X, Ys, app_out) → PERM_IN(Ys)

The TRS R consists of the following rules:

app_inU6(app_in)
app_inapp_out
U6(app_out) → app_out

The set Q consists of the following terms:

app_in
U6(x0)

We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: